package com.xius.controller;
import com.xius.common.ApiController;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.DynamicParameter;
import com.github.xiaoymin.knife4j.annotations.DynamicParameters;
import com.xius.common.R;
import com.xius.service.SecUserRoleService;
import com.github.pagehelper.PageHelper;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

/*
* *
* @author makejava
* @since 2020-06-12 17:14:18
*/
@RestController@RequestMapping("/api/secUserRole")public class SecUserRoleController extends ApiController {
    
    /*
    *     * 服务对象
    */
    @Resource    private SecUserRoleService secUserRoleService;
    @PostMapping("/queryAll")    @ApiOperationSupport(params = @DynamicParameters(                name = "SecUserRoleControllerQueryAll",                properties = {
    @DynamicParameter(name = "secUserRoleUserId", value = "用户主键"),@DynamicParameter(name = "secUserRoleRoleId", value = "角色主键"),    }
    ))    public R queryAll(@RequestBody Map<String,Object> map) {
        return success(secUserRoleService.queryAll(map));
    }
    @PostMapping("/queryAllJoin")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecUserRoleControllerQueryAllJoin",                    properties = {
    @DynamicParameter(name = "secUserRoleUserId", value = "用户主键"),@DynamicParameter(name = "secUserRoleRoleId", value = "角色主键"),    }
    ))    public R queryAllJoin(@RequestBody Map<String,Object> map) {
        return success(secUserRoleService.queryAllJoin(map));
    }
    @PostMapping("/queryById")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecUserRoleControllerQueryById",                    properties = {
    @DynamicParameter(name = "secUserRoleUserId", value = "用户主键"),@DynamicParameter(name = "secUserRoleRoleId", value = "角色主键"),    }
    ))    public R queryById(@RequestBody Map<String,Object> map) {
        return success(secUserRoleService.queryById(map));
    }
    @PostMapping("/insert")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecUserRoleControllerInsert",                    properties = {
    @DynamicParameter(name = "secUserRoleUserId", value = "用户主键"),@DynamicParameter(name = "secUserRoleRoleId", value = "角色主键"),    }
    ))    public R insert(@RequestBody Map<String,Object> map) {
        return success(this.secUserRoleService.insert(map));
    }
    @PostMapping("/inserts")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecUserRoleControllerInserts",                    properties = {
    @DynamicParameter(name = "secUserRoleUserId", value = "用户主键"),@DynamicParameter(name = "secUserRoleRoleId", value = "角色主键"),    }
    ))    public R inserts(@RequestBody List<Map<String,Object>> list) {
        return success(this.secUserRoleService.inserts(list));
    }
    @PostMapping("/update")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecUserRoleControllerUpdate",                    properties = {
    @DynamicParameter(name = "secUserRoleUserId", value = "用户主键"),@DynamicParameter(name = "secUserRoleRoleId", value = "角色主键"),    }
    ))    public R update(@RequestBody Map<String,Object> map) {
        return success(this.secUserRoleService.update(map));
    }
    @PostMapping("/deleteByIds")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecUserRoleControllerDeleteByIds",                    properties = {
    }
    ))    public R deleteByIds(@RequestBody Map<String,Object> map) {
        return success(this.secUserRoleService.deleteByIds(map));
    }
    @PostMapping("/deleteById")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecUserRoleControllerDeleteById",                    properties = {
    }
    ))    public R deleteById(@RequestBody Map<String,Object> map) {
        return success(this.secUserRoleService.deleteById(map));
    }
}
